	<?php 
	use_helper('javascript');
	use_helper('form');?>
	<div class="cTitle"><?php echo $cTitle; ?> :: 
	<?php echo link_to1('产品列表','product/index');?>  |  
	<?php echo link_to1('添加新产品','product/create');?>  |  
	<?php echo link_to1('首页推荐','product/index?flag=1');?>  |  	
	<?php echo link_to1('产品搜索','product/search');?>	
	</div>
	<div id="content">
	<form action="<?php echo url_for('product/esave') ?>" name="cp" id="cp" method="POST">
    <table class="cList" width="90%" cellspacing="1" cellpadding="2" >
	<tr>
	<td>名称</td>
	<td><?php echo input_tag('title',$product->getTitle())?><span class="red">*</span></td>
	</tr>
	<tr>
	<td>类别
	</td>
	<td>大类：<?php echo select_tag('bclass',options_for_select($bClass));?>
		小类：<?php echo select_tag('category',
		array($product->getCategory()=>$cate_title));?>
		<?php echo observe_field('bclass', array(
	    'update'   => 'category',
	    'url'      => url_for('category/ajaxsub'),
	    'with'     => "'fid=' + value",));
	    ?><span class="red">*</span>
	</td>
	</tr>
	<tr>
	<td>产地</td>
	<td><?php echo input_tag('city',$product->getCity())?><span class="red">*</span></td>
	</tr>
	<tr>
	<td>货号</td>
	<td><?php echo input_tag('lot_no',$product->getLotNo())?><span class="red">*</span></td>
	</tr>
	<tr>
	<td>大图片
	<?php echo javascript_tag('
	function openImg(itype){
		var iWidth=300; //窗口宽度
		var iHeight=200;//窗口高度
		var iTop=(window.screen.height-iHeight)/2;
		var iLeft=(window.screen.width-iWidth)/2;
		window.open("'.url_for('product/image?type=').'"+itype,"up_w","Scrollbars=no,Toolbar=no,Location=no,Direction=no,Resizeable=no,Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft);
	}	
	');?>
	</td>
	<td><?php echo input_tag('product_img',$product->getProductImg())?> <?php echo button_to_function('大图','openImg(1)');?><span class="red">*</span></td>
	</tr>
	<tr>
	<td>小图片</td>
	<td><?php echo input_tag('product_ico',$product->getProductIco())?> <?php echo button_to_function('小图','openImg(0)');?><span class="red">*</span></td>
	</tr>
	<tr>
	<td>规格</td>
	<td><?php echo input_tag('specs',$product->getSpecs())?></td>
	</tr>
	<tr>
	<td>参数</td>
	<td><?php echo textarea_tag('params',$product->getParams(),array(
	'rows'=>'10', 'cols'=>'70','rich'=>true,	
	))?></td>
	</tr>
	<tr>
	<td>报价</td>
	<td><?php echo input_tag('fprice',$product->getFprice())?></td>
	</tr>
	<tr>
	<td>卖价</td>
	<td><?php echo input_tag('sprice',$product->getSprice())?></td>
	</tr>
    <tr>
		<td class="cSecond" colspan="2">
		    <?php if($error):?><div class="error"><?php echo $error;?></div><?php endif;?>
		<?php echo input_hidden_tag('id',$product->getId())?>
		<input type="submit" value="保存" /></td>
    </tr>
    </table>
    </form>
	</div>
